#pragma once
template<class ElemType>
class BinaryTreeNode
{
public:
	BinaryTreeNode();
	BinaryTreeNode<ElemType>(ElemType data);
	~BinaryTreeNode<ElemType>();

	ElemType data;
	BinaryTreeNode<ElemType>* left;
	BinaryTreeNode<ElemType>* right;
};

template<class ElemType>
inline BinaryTreeNode<ElemType>::BinaryTreeNode()
{
	left = right = nullptr;
}

template<class ElemType>
inline BinaryTreeNode<ElemType>::BinaryTreeNode(ElemType e):BinaryTreeNode()
{
	this->data = e;
}

template<class ElemType>
inline BinaryTreeNode<ElemType>::~BinaryTreeNode()
{
	if (left != nullptr)
		delete left;
	if (right != nullptr)
		delete right;
}
